package com.hema.auction.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * author by john
 */

public class MessageInfo implements Parcelable {

    /**
     * id : 1
     * user_id : 1
     * title : 测试标题
     * content : 测试内容
     * create_at : 1498104000
     * is_read : 0
     */

    @SerializedName("id")
    private String id;
    @SerializedName("user_id")
    private String userId;
    @SerializedName("title")
    private String title;
    @SerializedName(value = "content", alternate = {"contents"})
    private String content;
    @SerializedName("is_read")
    private int isRead;
    /**
     * addtime : 1498474705
     * b_time : 1498436220
     * num : 0
     * status : 1
     * contents : 4234
     * isdel : 0
     */

    @SerializedName(value = "addtime", alternate = {"create_at"})
    private String addtime;
    @SerializedName("b_time")
    private String bTime;
    @SerializedName("num")
    private String num;
    @SerializedName("status")
    private String status;
    @SerializedName("isdel")
    private String isdel;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getIsRead() {
        return isRead;
    }

    public void setIsRead(int isRead) {
        this.isRead = isRead;
    }

    public MessageInfo() {
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getBTime() {
        return bTime;
    }

    public void setBTime(String bTime) {
        this.bTime = bTime;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsdel() {
        return isdel;
    }

    public void setIsdel(String isdel) {
        this.isdel = isdel;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.userId);
        dest.writeString(this.title);
        dest.writeString(this.content);
        dest.writeInt(this.isRead);
        dest.writeString(this.addtime);
        dest.writeString(this.bTime);
        dest.writeString(this.num);
        dest.writeString(this.status);
        dest.writeString(this.isdel);
    }

    protected MessageInfo(Parcel in) {
        this.id = in.readString();
        this.userId = in.readString();
        this.title = in.readString();
        this.content = in.readString();
        this.isRead = in.readInt();
        this.addtime = in.readString();
        this.bTime = in.readString();
        this.num = in.readString();
        this.status = in.readString();
        this.isdel = in.readString();
    }

    public static final Creator<MessageInfo> CREATOR = new Creator<MessageInfo>() {
        @Override
        public MessageInfo createFromParcel(Parcel source) {
            return new MessageInfo(source);
        }

        @Override
        public MessageInfo[] newArray(int size) {
            return new MessageInfo[size];
        }
    };
}
